import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description
 * User: cjc
 * Date: 2025-03-01
 * Time: 9:00
 */
public class Test {
    //斐波那契数列
    public static void fib(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        for (int j = 1; j <=n ; j++) {
            int f1 = 1;
            int f2 = 1;
            int f3 = 1;
            for (int i = 3; i <=j ; i++) {
                f3 = f1 + f2;
                f1 = f2;
                f2 = f3;
            }
            System.out.print(f3 + " ");
        }
    }

    //求最大值方法的重载
    public static int Max(int a,int b) {
        return Math.max(a,b);
    }
    public static double Max(double a,double b,double c) {
        if(a>b) {
            return Math.max(a, c);
        }else return Math.max(b, c);
    }
    public static void ReturnMax(String[] args) {
        double a= 3.5;
        double b= 2.5;
        double c= 3.5;
        double ret = Max(a,b,c);
        System.out.println(ret);
    }

    //求阶乘和:求1！+2！+3！+4！+........+n!的和
    //求阶乘n!
    public static int N(int n) {
        int ret = 1;
        for (int i = 1; i <= n ; i++) {
            ret *= i;
        }
        return ret;
    }
    public static void NSum(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int sum = 0;
        //求和
        for (int j = 1; j <= n; j++) {
            sum += N(j);
        }
        System.out.println(sum);
        scan.close();
    }

    //模拟登陆
    public static void LogIn(String[] args) {
        int count = 3;
        Scanner scan = new Scanner(System.in);
        String pw = "123hh";
        System.out.println("请登录：");
        while(count!=0) {
            String password = scan.nextLine();
            if(password.equals(pw)) {
                System.out.println("登录成功！");
                break;
            }
            System.out.println("登录失败！请重新登陆！");
            count--;
            System.out.println("你还有"+count+"次机会！");
        }
        scan.close();
    }

    //输出一个整数的每一位
    public static void GetNum(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        int i = num;
        while(num != 0) {
            i=num%10;
            System.out.print(i+" ");
            num/=10;
        }
        scan.close();
    }
}
